let yLabelColor = '#00e7ea'; //y轴字体颜色
let picLabelColor = '#01fefe' //图形文字颜色
let pieWordColor = '#fff'; //文字颜色
let dashedColor = '#c3c3b6'; //X轴虚线颜色
let fontSize = 30;
let splitLineDashed = {
  color: '#00d6e9',
  show: true,
  lineStyle: {
    opacity: 0.35,
    type: 'dashed'
  }
};
let splitLineSolid = {
  color: '#00d6e9',
  show: true,
  lineStyle: {
    opacity: 0.35,
    type: 'solid'
  }
}
import {
  newMakePandL,
  newMakePandY
} from './public';
import {
  height
} from 'window-size';

//上个月产品申诉情况
export const complaintOption = {
  grid: {
    containLabel: true,
    top: 100
  },
  legend: {
    top: 30,
    itemWidth: 70,
    itemHeight: 30,
    textStyle: {
      color: yLabelColor,
      fontSize: fontSize
    },
    data: [{
      name: '数量',
      icon: 'circle'
    }, {
      name: '同比'
    }, {
      name: '环比'
    }]

  },
  xAxis: {
    type: 'category',
    data: ['业务咨询人次', '质量申诉案件', '案件举报起诉', '网络舆情条数量'],
    // data:['汽配','特种设备','计量','建材','家电'],
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 50,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
      // show:true,
      name: '单位：个',
      nameTextStyle: {
        color: yLabelColor,
        padding: [0, 35, 0, 0],
        fontSize: fontSize
      },
      nameGap: 30,
      type: 'value',
      max: 300,
      splitNumber: 6,
      axisLine: {
        show: false,
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        color: yLabelColor,
        fontSize: fontSize
      },
      splitLine: splitLineDashed
    },
    {
      name: '单位：%',
      nameTextStyle: {
        color: yLabelColor,
        padding: [0, 0, 0, 35],
        fontSize: fontSize
      },
      type: 'value',
      max: 100,
      splitNum: 6,
      axisLine: {
        show: false,
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        color: yLabelColor,
        fontSize: fontSize
      },
      splitLine: splitLineSolid
    }
  ],
  series: [{
      name: '数量',
      type: 'bar',
      barWidth: '107',
      data: [{
        value: 70,
        itemStyle: {
          color: "#59b2ef"
        }
      }, {
        value: 40,
        itemStyle: {
          color: "#d87b7f"
        }
      }, {
        value: 90,
        itemStyle: {
          color: "#b6a3de"
        }
      }, {
        value: 200,
        itemStyle: {
          color: "#febb81"
        }
      }],
      itemStyle: {
        barBorderRadius: 10,
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(4, [0, 30]).point,
    },
    {
      name: '同比',
      data: [20, 132, 101, 134],
      type: 'line',
      itemStyle: {
        color: '#71d261'
      },
      lineStyle: {
        width: 8
      },
      symbol: 'circle',
      symbolSize: 16,
      yAxisIndex: 1
    },
    {
      name: '环比',
      data: [20, 13, 91, 204],
      type: 'line',
      itemStyle: {
        color: '#6e5995'
      },
      lineStyle: {
        width: 8
      },
      symbol: 'circle',
      symbolSize: 16,
      yAxisIndex: 1
    }
  ]
};

//受理最多的五种产品类型
export const pTypeTopOption = {
  legend: {
    type: 'plain',
    orient: 'vertical',
    itemHeight: 29,
    itemWidth: 32,
    itemGap: 42,
    textStyle: {
      color: yLabelColor,
      fontSize: fontSize,
      lineHeight: 5,
    },
    top: 270,
    right: 20
  },
  grid: {
    containLabel: true,
    top: 100,
    right: 300
  },
  xAxis: {
    type: 'category',
    data: ['汽配', '特种设备', '计量', '建材', '家电'],
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 50,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
    name: '单位：个',
    nameTextStyle: {
      color: yLabelColor,
      padding: [0, 35, 0, 0],
      fontSize: fontSize
    },
    nameGap: 30,
    type: 'value',
    max: 300,
    splitNumber: 6,
    min: 0,
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false,
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: splitLineDashed
  }, ],
  series: [{
      name: '业务咨询人次',
      type: 'bar',
      barWidth: '107',
      data: [],
      stack: 'sss',
      itemStyle: {
        color: '#80c269'
      },
    },
    {
      name: '质量申诉件',
      type: 'bar',
      barWidth: '107',
      data: [],
      stack: 'sss',
      itemStyle: {
        color: '#ffb980'
      },
    },
    {
      name: '案件举报起',
      type: 'bar',
      barWidth: '107',
      data: [],
      stack: 'sss',
      itemStyle: {
        color: '#d87a80'
      },
    },
    {
      name: '网络舆情条数量',
      type: 'bar',
      barWidth: '107',
      data: [],
      stack: 'sss',
      itemStyle: {
        color: '#5ab1ef'
      },
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(5, [0, 30]).point,
    },
  ]
};

//受理产品类型占比   饼图
export const productTypePieOption = {
  series: [{
    name: '面积模式',
    type: 'pie',
    label: {
      show: true,
      formatter: function (params) {
        return params.name + ' ' + params.value + '%'
      },
      color: picLabelColor,
      fontSize: fontSize
    },
    labelLine: {
      show: true
    },
    radius: [0, 300],
    center: ['50%', '50%'],
    data: [],
    roseType: 'radius',
  }]
}

//监督执法
export const supersiveOption = {
  grid: {
    containLabel: true,
    top: 100,
    x: 10,
    x2: 10,
    y2: 10 //
  },
  yAxis: {
    name: '单位：个',
    nameTextStyle: {
      color: yLabelColor,
      padding: [120, 0, 0, 0],
      fontSize: fontSize
    },
    nameGap: 30,
    type: 'value',
    max: 100,
    min: 0,
    splitNumber: 10,
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      interval: 0,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  xAxis: {
    type: 'category',
    data: ['出动执法人员人次', '查处违法案件', '立案查处', '现场处罚案件'],
    axisLine: {
      show: true,
    },
    axisTick: {
      show: true
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 60,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  series: [{
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(4, [0, 30], 40).point,
    },
    {
      type: 'bar',
      barWidth: 50,
      label: {
        show: true,
        fontSize: fontSize,
        color: '#fff'
      },
      itemStyle: {
        barBorderRadius: [20, 20, 0, 0]
      },
      data: [{
          value: 1,
          itemStyle: {
            color: '#69c7ff'
          }
        },
        {
          value: 2,
          itemStyle: {
            color: '#4bb3d2'
          }
        },
        {
          value: 3,
          itemStyle: {
            color: '#eba538'
          }
        },
        {
          value: 4,
          itemStyle: {
            color: '#d94d4d'
          }
        },
      ]
    }
  ]
};


//基本状况
export const baseStatusOption = {
  grid: {
    containLabel: true,
    top: 80,
    x: 10,
    x2: 10,
    y2: 10 //
  },
  xAxis: {
    type: 'category',
    data: ['计量类别1', '计量类别2', '计量类别3', '计量类别4', '计量类别5', '计量类别6', '计量类别7'],
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 70,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
    // show:true,
    name: '数量',
    nameTextStyle: {
      color: yLabelColor,
      padding: [0, 50, 0, 0],
      fontSize: fontSize,
    },
    nameGap: 30,
    type: 'value',
    max: 100,
    splitNumber: 5,
    min: 0,
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: splitLineDashed
  }, ],
  series: [{
      name: '数量',
      type: 'bar',
      barWidth: '20',
      data: [{
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        }, {
          value: 40,
          itemStyle: {
            color: "#d87b7f"
          }
        }, {
          value: 90,
          itemStyle: {
            color: "#b6a3de"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#febb81"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#5cb24d"
          }
        }
      ],
      itemStyle: {
        barBorderRadius: [10, 10, 0, 0],
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(7, [0, 30], 30).point,
    },
  ]
};

export const complaintTypeOption = {
  grid: {
    containLabel: true,
    top: 80,
    x: 10,
    x2: 10,
    y2: 10 //
  },
  xAxis: {
    type: 'category',
    data: ['计量类别1', '计量类别2', '计量类别3', '计量类别4', '计量类别5', '计量类别6', '计量类别7'],
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 70,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
    // show:true,
    name: '数量',
    nameTextStyle: {
      color: yLabelColor,
      padding: [0, 50, 0, 0],
      fontSize: fontSize,
    },
    nameGap: 30,
    type: 'value',
    max: 100,
    splitNumber: 5,
    min: 0,
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: splitLineDashed
  }, ],
  series: [{
      name: '数量',
      type: 'line',
      itemStyle: {
        color: '#f94399'
      },
      lineStyle: {
        width: 10
      },
      symbol: 'circle',
      symbolSize: 30,
      // barWidth: '20',
      data: [{
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        }, {
          value: 40,
          itemStyle: {
            color: "#d87b7f"
          }
        }, {
          value: 90,
          itemStyle: {
            color: "#b6a3de"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#febb81"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#5cb24d"
          }
        }
      ],
      itemStyle: {
        barBorderRadius: [10, 10, 0, 0],
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(7, [0, 30], 30).point,
    },
  ]
};

//监督执法
export const superviseOption = {
  grid: {
    containLabel: true,
    top: 80,
    x: 10,
    x2: 10,
    y2: 10 //
  },
  xAxis: {
    type: 'category',
    data: ['计量类别1', '计量类别2', '计量类别3', '计量类别4', '计量类别5', '计量类别6', '计量类别7'],
    axisLine: {
      show: false,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 70,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
    // show:true,
    name: '数量',
    nameTextStyle: {
      color: yLabelColor,
      padding: [0, 50, 0, 0],
      fontSize: fontSize,
    },
    nameGap: 30,
    type: 'value',
    max: 100,
    splitNumber: 5,
    min: 0,
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: splitLineDashed
  }, ],
  series: [{
      name: '数量',
      type: 'bar',
      barWidth: '100',
      data: [{
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#59b2ef"
          }
        }, {
          value: 40,
          itemStyle: {
            color: "#d87b7f"
          }
        }, {
          value: 90,
          itemStyle: {
            color: "#b6a3de"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#febb81"
          }
        }, {
          value: 200,
          itemStyle: {
            color: "#5cb24d"
          }
        }
      ],
      itemStyle: {
        barBorderRadius: [40, 40, 0, 0],
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(7, [0, 30], 30).point,
    },
  ]
};


//标准 tab页
export const standerTypeOption = {
  grid: {
    containLabel: true,
    top: 80,
    // x: 10,
    // x2: 10,
    // y2: 10 //
  },
  xAxis: {
    type: 'category',
    data: ['计量类别1', '计量类别2', '计量类别3', '计量类别4', ],
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 70,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
    // show:true,
    name: '数量',
    nameTextStyle: {
      color: yLabelColor,
      padding: [0, 50, 0, 0],
      fontSize: fontSize,
    },
    nameGap: 30,
    type: 'value',
    max: 100,
    splitNumber: 5,
    min: 0,
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      fontSize: fontSize
    },
    splitLine: splitLineDashed
  }, ],
  series: [{
      name: '数量',
      type: 'bar',
      barWidth: '56',
      data: [{
          value: 70,
          itemStyle: {
            color: "#d94d4d"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#eba538"
          }
        },
        {
          value: 70,
          itemStyle: {
            color: "#87ab66"
          }
        }, {
          value: 40,
          itemStyle: {
            color: "#4bb3d2"
          }
        },
      ],
      itemStyle: {
        barBorderRadius: [28, 28, 0, 0],
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(7, [0, 30], 30).point,
    },
  ]
};

//标准
export const standerdOption = {
  grid: {
    containLabel: true,
    top: 100
  },
  legend: {
    top: 30,
    itemWidth: 32,
    itemHeight: 29,
    textStyle: {
      color: yLabelColor,
      fontSize: fontSize
    },
    data: [{
      name: '国家标准',
      icon: 'rect',
    }, {
      name: '企业标准',
      icon: 'rect',
    }]

  },
  xAxis: {
    type: 'category',
    data: ['标准1', '标准2', '标准3', '标准4','标准5','标准6'],
    axisLine: {
      show: true,
    },
    axisTick: {
      show: false
    },
    axisLabel: {
      show: true,
      color: yLabelColor,
      margin: 50,
      fontSize: fontSize
    },
    splitLine: {
      show: false
    }
  },
  yAxis: [{
      // show:true,
      name: '数量',
      nameTextStyle: {
        color: yLabelColor,
        padding: [0, 50, 0, 0],
        fontSize: fontSize
      },
      nameGap: 30,
      type: 'value',
      max: 300,
      splitNumber: 6,
      axisLine: {
        show: false,
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        color: yLabelColor,
        fontSize: fontSize
      },
      splitLine: splitLineDashed
    },
    {
      name: '单位：%',
      nameTextStyle: {
        color: yLabelColor,
        padding: [0, 0, 0, 35],
        fontSize: fontSize
      },
      type: 'value',
      max: 100,
      splitNum: 6,
      axisLine: {
        show: false,
      },
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        color: yLabelColor,
        fontSize: fontSize
      },
      splitLine: splitLineSolid
    }
  ],
  series: [{
      name: '数量',
      type: 'bar',
      barWidth: '39px',
      data: [],
      itemStyle: {
        barBorderRadius: [20,20,0,0],
        color: '#d87a80'
      }
    },{
      name: '数量',
      type: 'bar',
      barWidth: '39px',
      data: [],
      itemStyle: {
        barBorderRadius: [20,20,0,0],
          color: '#aeff00'
      }
    },
    {
      type: 'line',
      symbol: 'circle',
      symbolSize: 14,
      markPoint: newMakePandL(6, [0, 30]).point,
    },
    {
      name: '国家标准',
      data: [20, 132, 101, 134],
      type: 'line',
      itemStyle: {
        color: '#aeff00'
      },
      lineStyle: {
        width: 8
      },
      symbol: 'circle',
      symbolSize: 16,
      yAxisIndex: 1
    },
    {
      name: '企业标准',
      data: [20, 13, 91, 204],
      type: 'line',
      itemStyle: {
        color: '#d87a80'
      },
      lineStyle: {
        width: 8
      },
      symbol: 'circle',
      symbolSize: 16,
      yAxisIndex: 1
    }
  ]
};
